<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <title>批发退货审核页面的查看详情</title>
	<link rel="stylesheet" href="../../res/mln/layui.css" media="all">
  <style>
    body{margin: 10px;}
    .demo-carousel{height: 300px; line-height: 300px; text-align: center;}
    .demoTable{
    	z-index: 10px;
    }
  </style>
</head>
<body>
	
	<table class="layui-hide" id="wholesaleDetailsh" lay-filter="demo"></table>

<script src="../../res/mln/jquery-1.10.2.js"></script>
<script src="../../res/mln/layui-xtree.js"></script>
<script src="../../res/mln/layui.js"></script>
<script src="../../res/js/base.js"></script>
<script type="text/javascript" src="../../res/mln/getUrlParam.js"></script>

<script>

layui.use(['form','laydate', 'laypage', 'layer', 'table', 'upload', 'element','tree'], function(){
  var form = layui.form
  ,laydate = layui.laydate //日期
  ,laypage = layui.laypage //分页
  ,layer = layui.layer //弹层
  ,table = layui.table //表格
  ,upload = layui.upload //上传
  ,element = layui.element; //元素操作
  var path=getRootPath();
  
  //取到销售ID
  var pfId = getUrlParam('pfId');

  //监听Tab切换
  element.on('tab(demo)', function(data){
    console.log(data);
  });
  
  //执行一个 table 实例
  table.render({
     elem: '#wholesaleDetailsh'
    ,async: false
    ,height: 474
    ,url: path+'wholesaleDetail/wholesaleFindAll.action?pfId='+pfId //数据接口
    ,page: true //开启分页
    ,method:'post'
    ,size:'sm'
    ,cols: [[ //表头
    	 {field: 'numbers', title: '药品批次号', width:120 }
         ,{field: 'drugName', title: '药品名称', width:120}
         ,{field: 'pfxqUnit', title: '单位', width:120}
         ,{field: 'pfxqNumber', title: '数量', width:120}
         ,{field: 'pfxqPrice', title: '批发价', width:120}
         ,{field: 'pfxqSubtotal', title: '小计', width:120}
         
    ]]
  	,id: 'testReload'
  });
  
  //监听工具条
  table.on('tool(demo)', function(obj){ //注：tool是工具条事件名，test是table原始容器的属性 lay-filter="对应的值"
    var data = obj.data //获得当前行数据
    ,layEvent = obj.event; //获得 lay-event 对应的值
    if(layEvent === 'del'){
      
    } else if(layEvent === 'edit'){
	      
	     
		}
    else if(layEvent === 'salesReturn'){
    	
 
    }
    });
	});
</script>
</body>
</html>